<?php
trait A{
    public $i=5;
}

trait B{
    function __construct(){
        $this->i='改变了';
    }
}
trait C{
    function f(){
        echo $this->i;
    }
}
class D{
    use A,B,C;
}
$d=new D();
$d->f();
